window.onload = function () {
    // 创建地图实例
    var objWin;
   

           dojo.require("esri.map");
           dojo.require("esri.InfoTemplate");
           dojo.require("esri.geometry");
           dojo.require("esri.geometry.Extent");
           dojo.require("esri.layers.FeatureLayer");
           dojo.require("esri.layers.OpenStreetMapLayer");
           dojo.require("esri/layers/WebTiledLayer");
           dojo.require("esri.symbols.TextSymbol");
           dojo.require("esri.symbols.SimpleMarkerSymbol");
           dojo.require("esri.symbols.PictureMarkerSymbol");
           dojo.require("esri.symbols.SimpleLineSymbol");
           dojo.require("esri.graphic");
           dojo.require("esri.tasks.GeometryService");
           dojo.require("dojo/_base/array");

           var map;
           var myGraphicLayer;
           var graphicLayer;
           var myFeatureLayer;
           var myToolbar;
           var flag = false;
           var rsflag = true;
           var myLocation = "";
           var handler;
           var gsvc;
           var Village;
           var People;
           var ObjectId;

           dojo.addOnLoad(function () {
               map = new esri.Map("mymap", {
                   basemap: "hybrid",
                center: [103.96, 27.83],
                   center:[103.09145,26.02389],
                   zoom: 15,
               });

               var mapQuest = new esri.layers.WebTiledLayer("http://202.203.132.223:7999/offline/{level}/{col}/{row}.jpg", {
 
                   SpatialReference: 4326
               });
               var Street = new esri.layers.WebTiledLayer("http://202.203.132.223:7999/overlay_s/{level}/{col}/{row}.png", {
           
                   SpatialReference: 4326
               });
               map.addLayer(mapQuest);
               map.addLayer(Street);

               var myInfoTemplate = new esri.InfoTemplate("${Name}", "名称：${Name}");
               var ftLayer = {
                   mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
                   outFields: ["*"]
               }
               myFeatureLayer = new esri.layers.FeatureLayer("http://202.203.132.223:6080/arcgis/rest/services/test/FeatureServer/0", ftLayer);//显示原始数据点图层
               myFeatureLayer.isVisible = true;
               map.addLayer(myFeatureLayer);

               myGraphicLayer = new esri.layers.GraphicsLayer();//显示画图结果和查询结果点图层
               map.addLayer(myGraphicLayer);

               graphicLayer = new esri.layers.GraphicsLayer();//备用显示图层
               map.addLayer(graphicLayer);

               myToolbar = new esri.toolbars.Draw(map);

               gsvc = new esri.tasks.GeometryService("http://202.203.132.223:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer");

               dojo.connect(myFeatureLayer, 'onClick', showTemplate);
               dojo.connect(myGraphicLayer, 'onClick', showInnerHTML);
               dojo.connect(map.graphics, 'onClick', showInnerHTML);
    
               dojo.connect(myToolbar, "onDrawEnd", myDrawEnd);
               dojo.connect(map, 'onMouseMove', showCoordinates);

           });

}

   function showCoordinates(evt) {
               var mp = evt.mapPoint;
               var longitude = mp.getLongitude();
               var latitude = mp.getLatitude();
               dojo.byId("DivBottom").innerHTML = "地图坐标(经度,纬度):" + "(" + longitude + ", " + latitude + ")";
           }

           function mySimpleRender() {
               var layer = map.getLayer(map.layerIds[1]);
               if (rsflag == false) {
                   map.getLayer(map.layerIds[1]).setVisibility(true);
                   rsflag = true;
               }
               else {
                   map.getLayer(map.layerIds[1]).setVisibility(false);
                   rsflag = false;
               }
           }

           function GeoLocation() {
               if (navigator.geolocation) {
                   navigator.geolocation.getCurrentPosition(
                       positionSuccess,
                       positionError,
                       {
                           enableHighAccuracy: true,
                           timeout: 10000,
                       }
                   );
               }
               else {
                   alert('浏览器不支持GPS定位，请更换浏览器后再试.');
               }
           }

           function positionSuccess(position) {
               var latitude = position.coords.latitude;
               var longitude = position.coords.longitude;
               var accuracy = position.coords.accuracy;
               var result = "lat:" + latitude.toString() + "," + "log:" + longitude.toString() + "," + "acu:" + accuracy.toString();
               alert(result);
          
               var InfoTemplate = new esri.InfoTemplate("地理位置", "坐标：" + result);
               var pointSymbol = new esri.symbol.SimpleMarkerSymbol();
               pointSymbol.style = esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE;
               pointSymbol.setSize(20);
               pointSymbol.setColor(new dojo.Color("#FFFFCC"));

               var myPoint = new esri.geometry.Point(longitude, latitude);
               
               var graphic = new esri.Graphic();
               graphic.setGeometry(myPoint);
             
               graphic.setSymbol(pointSymbol);
               graphicLayer.clear();
               graphicLayer.add(graphic);
               map.centerAndZoom(myPoint, 15);
               handler = dojo.connect(graphicLayer, "onClick", myJumper);
           }

           function myJumper(evt) {
               alert("jumper succeseed!");
               graphicLayer.clear();
               dojo.disconnect(handler);
              
               window.location.assign("addLocalPointtoMap.html?longitude=" + evt.graphic.geometry.x + "&latitude=" + evt.graphic.geometry.y);
            
           }

           function positionError(error) {
               var errorTypes = {
                   1: '没有权限获取定位数据.', // permission denied
                   2: '获取定位数据失败.', //position unavailable
                   3: '获取定位数据超时.' // timeout
               };
               alert(errorTypes[error.code]);
           }

           function myDrawEnd(geometry) {
        
               myGraphicLayer.clear();
             
               var polygonSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([255, 0, 0]), 1), new dojo.Color([255, 255, 0, 0.25]));
              
               var pointSymbol = new esri.symbol.SimpleMarkerSymbol();
               pointSymbol.style = esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE;
               pointSymbol.setSize(12);
               pointSymbol.setColor(new dojo.Color("#FFFFCC"));
             
               var lineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 3);

               myToolbar.deactivate();

            

               if (geometry.type == "polygon") {
                   var graphicPolygon = new esri.Graphic(geometry, polygonSymbol);
                   myGraphicLayer.add(graphicPolygon);

                   var QueryTask = new esri.tasks.QueryTask("http://202.203.132.223:6080/arcgis/rest/services/test/FeatureServer/0");
                   query = new esri.tasks.Query();
                   query.geometry = geometry;
                   query.outFields = ["*"];
                   query.outSpatialReference = new esri.SpatialReference(4326);//map.spatialReference; 
                   query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_CONTAINS;
                   query.returnGeometry = true;
                   QueryTask.execute(query, ShowQueryResult);
               }
               if (geometry.type == "polyline") {
                   var graphicPolyline = new esri.Graphic(geometry, lineSymbol);
                   myGraphicLayer.add(graphicPolyline);

                   esriConfig.defaults.io.proxyUrl = "/proxy";
                   esriConfig.defaults.io.alwaysUseProxy = false;
                   var lengthParams = new esri.tasks.LengthsParameters();
                   lengthParams.polylines = [geometry];
                   lengthParams.lengthUnit = esri.tasks.GeometryService.UNIT_KILOMETER;
                   lengthParams.geodesic = true;
                   gsvc.lengths(lengthParams, function (lenResult) {
                       myGraphicLayer.add(new esri.Graphic(geometry, lineSymbol));
                       map.infoWindow.setTitle("距离测量");
                       map.infoWindow.setContent("测量长度：<strong>" + parseFloat(String(lenResult.lengths[0]).substring(0, 5)) + "千米</strong>");
                       var CurX = geometry.paths[0][geometry.paths[0].length - 1][0];
                       var CurY = geometry.paths[0][geometry.paths[0].length - 1][1];
                       var CurPos = new esri.geometry.Point(CurX, CurY, map.spatialReference);
                       map.infoWindow.show(CurPos);
                   }
                   );
               }
               if (geometry.type == "point") {
                 
                   var graphicpoint = new esri.Graphic(geometry, pointSymbol);
                   var params = new esri.tasks.BufferParameters();

                   params.distances = prompt("请输入缓冲区半径（米）:", "1000");
                   if (params.distances != null) {
                       params.distances = [parseFloat(params.distances)];
                   } else {
                       alert("请输入缓冲区半径（米）！");
                   }

               
                   params.outSpatialReference = map.SpatialReference;
                   params.bufferSpatialReference = map.SpatialReference;
                   params.geometries = [geometry];
                   gsvc.buffer(params, showBuffer, function (err) { alert(err) });
                   myGraphicLayer.add(graphicpoint); //用默认的图层添加
               }
           }

           function showBuffer(bufferedGeometries) {
               var symbol = new esri.symbol.SimpleFillSymbol(
                     esri.symbol.SimpleFillSymbol.STYLE_SOLID,
                      new esri.symbol.SimpleLineSymbol(
                        esri.symbol.SimpleLineSymbol.STYLE_SOLID,
                        new dojo.Color([255, 0, 0, 0.65]), 2
                      ),
                   new dojo.Color([255, 0, 0, 0.35])
               );

               dojo.forEach(bufferedGeometries, function (geometry) {
                   var graphic = new esri.Graphic(geometry, symbol);
                   myGraphicLayer.add(graphic);

                   var QueryTask = new esri.tasks.QueryTask("http://202.203.132.223:6080/arcgis/rest/services/test/FeatureServer/0");
                   query = new esri.tasks.Query();
                   query.geometry = geometry;
                   query.outFields = ["*"];
                   query.outSpatialReference = new esri.SpatialReference(4326);//map.spatialReference; 
                   query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_CONTAINS;
                   query.returnGeometry = true;
                   QueryTask.execute(query, ShowQueryResult);
               });
              
           }

           function EnterPress(e) {
               var btn1 = document.getElementById("searchbtn");
              
               var e = e || window.event;
               if (e.keyCode == 13) {      //回车等于查询按钮
                 
                   event.preventDefault()
                   btn1.onclick();
               }
               return false;
           }

           function myQueryFeatureLayer() {
               var queryName = document.getElementById('txtName').value;
               if (queryName == "")
                   return;
               var id = dojo.byId("fieldname");
               var option = id.options;
               var value = id.value;
               var fieldname = value;
               var whereStr = value + " like '%" + queryName + "%'";
               var QueryTask = new esri.tasks.QueryTask("http://202.203.132.223:6080/arcgis/rest/services/test/FeatureServer/0");
               query = new esri.tasks.Query();
               query.where = whereStr;
               query.outFields = ["*"];
               query.returnGeometry = true;
               QueryTask.execute(query, ShowQueryResult, ShowQueryError);


           }

           function ShowQueryError(evt) {
               alert(evt);
           }

           function ShowQueryResult(queryResult) {
               myGraphicLayer.clear();
               map.graphics.clear();
               if (queryResult.features.length == 0) {
                   document.getElementById("divShowResult").innerHTML = "没有结果！";
                   return;
               }
               else {
                   

                   map.infoWindow.resize(200, 200);
                   map.infoWindow.setTitle("查询到特征数");
                   var str = '个数：' + queryResult.features.length.toString();
                   map.infoWindow.setContent(str);
                   map.infoWindow.show();

                   var pointSymbol = new esri.symbol.SimpleMarkerSymbol();
                   pointSymbol.style = esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE;
                   pointSymbol.setSize(12);
                   pointSymbol.setColor(new dojo.Color("#FFFFCC"));

                   var pictureMarkerSymbol = new esri.symbol.PictureMarkerSymbol('images/red.png', 25, 25);

                   

                   var htmls = "<table style=\"width:100%;overflow:scroll\"><tr>";
                   htmls = htmls + "<td>查询结果:</td>";
                   htmls = htmls + "</tr></table>";
                   htmls = htmls + "<table style=\"width:100%\">";

                   for (var i = 0; i < queryResult.features.length; i++) {

                       var graphic = queryResult.features[i];

                      
                       graphic.setSymbol(pictureMarkerSymbol);
                       var objectid = graphic.attributes["OBJECTID"];
                       var name = graphic.attributes["Name"];
                       var village = graphic.attributes["Village"];
                       var myInfoTemplate = new esri.InfoTemplate();
                       myInfoTemplate.setTitle(name);
                       myInfoTemplate.setContent("姓名:" + name + "<br>" + "所属村:" + village);
                       graphic.infoTemplate = myInfoTemplate;
                       myGraphicLayer.add(graphic);

                   

                       var textSymbol = new esri.symbol.TextSymbol(name);
                       textSymbol.setColor(new dojo.Color([128, 0, 0]));
                       textSymbol.setOffset(0, 10);
                     
                       var graphicText = new esri.Graphic(graphic.toJson());
                       graphicText.setSymbol(textSymbol);
                       map.graphics.add(graphicText);

                       var pName = graphic.attributes["Name"];
                       var geometry = graphic.geometry;
                       var ptPoi = geometry;
                       if (i % 2 == 0)
                           htmls = htmls + "<tr>";
                       else
                           htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
                      
                       htmls = htmls + "<td><a href=\"#\" onclick=\"SetQueryCenter('" + pName + "'," + ptPoi.x + "," + ptPoi.y + ")\">" + pName + "</a></td>";
                   
                       htmls = htmls + "</tr>";


                   }

                   htmls = htmls + "</table>";
               /*    document.getElementById("divShowResult").style.overflow = "scroll";*/
                   document.getElementById("divShowResult").innerHTML = htmls;
                  
                   map.centerAndZoom(graphic.geometry, 15);
               }
           }
           function indoor() {
               var name = People;
               var uid = ObjectId;
               window.open("myThreejs.html?name=" + name + "&objectid=" + uid);

           }
           function outdoor() {

               window.open("360show.html");

           }

           function SetQueryCenter(pName, longitude, latitude) {
               var myPoint = new esri.geometry.Point(longitude, latitude);
               map.centerAndZoom(myPoint, 15);
           }

           function myCancel() {
               document.getElementById("txtName").value = "";
           }


           function myDrawPolygon() {
               myToolbar.activate(esri.toolbars.Draw.POLYGON);
           }

           function myDrawPolyline() {
               myToolbar.activate(esri.toolbars.Draw.POLYLINE);
           }

           function myDrawPoint() {
               myToolbar.activate(esri.toolbars.Draw.POINT);
           }

           function showTemplate(evt) {
           	   $('#myPageTop').animate({
 			  		'right': '70px',
 				
 				});
	
               var img = document.getElementById('photo');
               img.removeAttribute('class');
               var uploads = document.getElementById('DivBottom1');
               uploads.className = 'none';

               var objectid = evt.graphic.attributes["OBJECTID"];
               ObjectId = objectid;
               var name = evt.graphic.attributes["Name"];
               People = name;
               var village = evt.graphic.attributes["Village"];
               Village = village;
               var myInfoTemplate = new esri.InfoTemplate();
               myInfoTemplate.setTitle(name);
               var str = "姓名:" + name + "&nbsp&nbsp" + "所属村:" + village;
               myInfoTemplate.setContent(str + "<br>" + "<br>" +
                       "<input type=\"button\" value=\"室内全景漫游\" onclick=\"indoor()\" style=\"margin-right:10px;\">"
                     
                       );
               evt.graphic.infoTemplate = myInfoTemplate;
               showInnerHTML(evt);
               $.ajax({

                   type: "post",

                   contentType: "application/json", //传值的方式

                   url: "gis.aspx/GetValueAjax", //WebAjaxForMe.aspx为目标文件，GetValueAjax为目标文件中的方法
                   //WebAjaxForMe.asmx
                   data: "{objectid:'" + objectid + "',name:'" + name + "'}",
                   success: function (result) {

                       //alert(result.d); //result.d为后台返回的参数
                       a = result.d;
                       if (a != null) {

                           var img = document.getElementById('img5');
                           img.removeAttribute('class');
                           var upload = document.getElementById('upload');
                           upload.className = 'none';

                           var img = document.getElementById("img5");
                           img.src = "images/" + a;

                       }
                       else {

                           var img = document.getElementById('img5');
                           img.className = 'none';
                           var upload = document.getElementById('upload');
                           upload.removeAttribute('class');

                           var htmls = "<a style=\"font-size:32px\">";
                           htmls = htmls + "当前贫困户无照片信息，请点击";
                           htmls = htmls + "</a>";
                           htmls = htmls + " <input type=\"button\" value=\"上传\" onclick=\"Jumper()\"  style=\"font-size:27px;\"> >";
                           upload.innerHTML = htmls;
                       }

                   }

               })

           }

           function Jumper() {



               var el1 = document.getElementById('photo');
               el1.className = 'none';
               var el2 = document.getElementById('DivBottom1');
               el2.removeAttribute('class');


               var text = escape(People);


               if (text != "undefined") {

                   //window.location.assign("HtmlPage1.html?text=" + text + "&time=" + window.time);
               }
               else {
                   alert("请点击贫困户点！");
               }
           }
           function showInnerHTML(evt) {
               var attr = evt.graphic.attributes;
               var htmls = "<button class=\"iconfont icon-close\" id=\"result_close\" onclick=\"close()\"></button>"; 
               htmls = htmls + "<table style=\"width:200px;\"><tr>";
               htmls = htmls + "<td style=\"font-size:16px;display:inline-block;padding:10px;width:200px;\">查询结果:</td>";
               htmls = htmls + "</tr></table>";
               htmls = htmls + "<table style=\"width:100%;overflow:scroll\">";
               htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
               htmls = htmls + "<td>姓名：" + attr["Name"] + "</td>";
               htmls = htmls + "</tr>";
               htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
               htmls = htmls + "<td>所属村：" + attr["Village"] + "</td>";
               htmls = htmls + "</tr>";
               htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
               htmls = htmls + "<td>人口数：" + attr["Population"] + "</td>";
               htmls = htmls + "</tr>";
               htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
               htmls = htmls + "<td>劳力数：" + attr["Labor"] + "</td>";
               htmls = htmls + "</tr>";
               htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
               htmls = htmls + "<td>致贫原因：" + attr["Reason"] + "</td>";
               htmls = htmls + "</tr>";
               htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
               htmls = htmls + "<td>电话号码：" + attr["PhoneNumbe"] + "</td>";
               htmls = htmls + "</tr>";
               htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
               htmls = htmls + "<td>挂包人：" + attr["Supporters"] + "</td>";
               htmls = htmls + "</tr>";
               htmls = htmls + "<tr bgcolor=\"#F0F0F0\">";
               htmls = htmls + "<td>挂包单位：" + attr["Supporte_1"] + "</td>";
               htmls = htmls + "</tr>";
               htmls = htmls + "<td><input type=\"button\" value=\"详细信息\"  onclick=\"myshow()\"></input></td>";
               htmls = htmls + "</tr>";

               htmls = htmls + "</table>";
            /*   document.getElementById("divShowResult").style.overflow = "scroll";*/
               document.getElementById("divShowResult").innerHTML = htmls;
           }

           function myAddNewPoint(myPoint) {
               window.open("addPointTexttoMap.html");
           }

           function myAddNewLine() {
               window.open("addLineTexttoMap.html");
           }

           function myAddNewPoygon() {
               window.open("addPoygonTexttoMap.html");
           }
           function myUniqueRender() {
               window.open("RenderByAttributes.html")
           }



           function upload() {
               //接收传来的名字
               GetRequest();
               //var file1 = document.getElementById("file1");
               var file1 = document.getElementById("doc");

               postFile(file1.files[0]);

               function postFile(data) {
                   //1.创建异步对象（小浏览器）
                   //setImagePreview(0);
                   var req = new XMLHttpRequest();
                   //2.设置参数
                   req.open("post", "Handler1.ashx", true);

                   //3.设置 请求 报文体 的 编码格式（设置为 表单默认编码格式）
                   req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                   // req.setRequestHeader("")
                   //4.设置回调函数
                   req.onreadystatechange = function () {
                       //请求状态readyState=4准备就绪,服务器返回的状态码status=200接收成功
                       if (req.readyState == 4 && req.status == 200) {

                           if (req.responseText != "上传出错！") {
                               changeName(req.responseText);
                           }
                       }
                   };
                   req.upload.addEventListener("progress", progressFunction, false); //注册进度条事件

                   //4.发送异步请求
                   req.send(data); //post传参在此处
               }

               function changeName(name) {
                   var file1 = document.getElementById("doc");
                   var realnew = file1.value;
                   //var realnamesplit =new Array();
                   var realnamesplit = realnew.split(".");
                   var realname = realnamesplit[0] + "$" + People + "." + realnamesplit[1];
                   var village = Village;
                   var objectid = ObjectId;
                   var req = new XMLHttpRequest();

                   //如果名称遇到中文，请在此处转码,然后放入url中
                   req.open("get", "Handler1.ashx?name=" + name + "&village=" + village + "&objectid=" + objectid + "&realname=" + realname, true);

                   req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

                   req.onreadystatechange = function () {
                       //请求状态readyState=4准备就绪,服务器返回的状态码status=200接收成功
                       if (req.readyState == 4 && req.status == 200) {
                           document.getElementById("sp").innerHTML = req.responseText + "<br/>" + realname;
                       }
                   };
                   //4.发送异步请求
                   req.send();
               }
           }

           function progressFunction(evt) {

               var progressBar = document.getElementById("progressBar");

               var percentageDiv = document.getElementById("percentage");

               if (evt.lengthComputable) {

                   progressBar.max = evt.total;

                   progressBar.value = evt.loaded;

                   percentageDiv.innerHTML = Math.round(evt.loaded / evt.total * 100) + "%";

               }

           }

           //下面用于图片上传预览功能
           function setImagePreview(avalue) {
               var docObj = document.getElementById("doc");

               var imgObjPreview = document.getElementById("preview");

               if (docObj.files && docObj.files[0]) {
                   //火狐下，直接设img属性
                   imgObjPreview.style.display = 'block';
                   imgObjPreview.style.width = '150px';
                   imgObjPreview.style.height = '180px';
                   //imgObjPreview.src = docObj.files[0].getAsDataURL();

                   //火狐7以上版本不能用上面的getAsDataURL()方式获取，需要一下方式
                   imgObjPreview.src = window.URL.createObjectURL(docObj.files[0]);
               }
               else {
                   //IE下，使用滤镜
                   docObj.select();
                   var imgSrc = document.selection.createRange().text;
                   var localImagId = document.getElementById("localImag");
                   //必须设置初始大小
                   localImagId.style.width = "150px";
                   localImagId.style.height = "180px";
                   //图片异常的捕捉，防止用户修改后缀来伪造图片
                   try {
                       localImagId.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
                       localImagId.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgSrc;
                   }
                   catch (e) {
                       alert("您上传的图片格式不正确，请重新选择!");
                       return false;
                   }
                   imgObjPreview.style.display = 'none';
                   document.selection.empty();
               }
               return true;
           }

           function GetRequest() {
               theRequest = People;
               return theRequest;
           }
           function Heatmap() {

               var heat = document.getElementById("heatmap");
               var hotone = document.getElementById('gg');
               var state = hotone.style.display;
               if (state == "block") {
                   hotone.style.display = "none";
               }
               else {
                   try {
                       var isId = heat.hasAttribute('class');
                   } catch (e) {
                       var isId = (line.className == '') ? false : true;
                   } finally {
                       if (isId) {
                           heat.removeAttribute('class');
                           var hotone = document.getElementById('gg');

                           hotone.style.display = "none";
                       }
                       else {
                           heat.className = 'none';
                           var hotone = document.getElementById('gg');

                           hotone.style.display = "none";
                       }
                   }
               }
           }
             
         
        
          
           function openheat() {
          
               var id = dojo.byId("Select1");
               var option = id.options;
               var value = id.value;
               if (value == "population") {
                   //window.open("HeatmapRenderer.html");
                   var hotone = document.getElementById('gg');
                   gg.src = "HeatmapRenderer.html"
                   hotone.style.display = "block";
               }
               if (value == "reason") {
                   var hotone = document.getElementById('gg');
                   gg.src = "HeatmapRenderer_reason.html"
                   hotone.style.display = "block";
               }
               var hea = document.getElementById("heatmap");
               hea.className = 'none';
              
           }
         

        


        
           function opensand() {
               window.location.href="2Dto3D.html";
           }
           function opentimeline() {
               window.location.href = "timeline1.html";
           }
          
         
           function myshow() {
               //目标页面 

               var target = "hzInfo.aspx?name=" + People + "&objectid=" + ObjectId;
               //判断是否打开 
               if (objWin == null || objWin.closed) {
                   objWin = window.open(target);
                 
               } else {
                   objWin.location.replace(target);
               }
               objWin.focus();
           }

